Skip to content

Conversation

@ealeksandrov
Copy link
Contributor

Closes: #8279

Description

This PR updates analytics hub layout to prevent screen bounds overflow on large text size.

How

Main reason for view overflow is the fixed frame size for line charts in report cards. The fix is to pin their aspect ratio instead and suggest max width from the scaled property. Suggesting max width prevents view from growing too big to occupy all parents space.

Testing

  1. Build and run the app in debug/alpha mode.
  2. Select biggest accessibility text size in the iOS settings.
  3. On the dashboard view tap the "See more" button.
  4. After view loads confirm that nothing in UI expands out of the screen width.
  5. Confirm no text is truncated.

Screenshots

before after
Simulator Screen Shot - 1 Simulator Screen Shot - 3
Simulator Screen Shot - 2 Simulator Screen Shot - 4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@ealeksandrov ealeksandrov added the feature: stats Related to stats, including Top Performers. label Dec 7, 2022
@ealeksandrov ealeksandrov added this to the 11.6 milestone Dec 7, 2022
@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

.bold()
}
.padding(.leading)
.fixedSize(horizontal: false, vertical: true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is needed to prevent multiline text truncation:

@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8336-381c8ba on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@rachelmcr rachelmcr self-assigned this Dec 8, 2022
Copy link
Contributor

@rachelmcr rachelmcr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ealeksandrov ealeksandrov merged commit 3f1de9e into trunk Dec 8, 2022
@ealeksandrov ealeksandrov deleted the issue/8729-dynamic-size branch December 8, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: stats Related to stats, including Top Performers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Analytics Hub] View overflows with accessibility fonts

4 participants